<?php
namespace Home\Controller;
use Think\Controller;

class CommonController extends Controller {
	/**
	 * [二维数组转换字符串]
	 * @Author   Axing
	 * @DateTime 2017-08-22
	 * @param    [array]     $arr   [二维数组数据]
	 * @param    [string]    $field [字段名]
	 * @return   [string]	 $data  [商品id组]
	 */
	public function arrCstr($arr, $field) {
		$data = array();

		foreach($arr as $k => $v) {
			$data[$k] = $v[$field];
		}

		$data = implode(',', $data);
		return $data;
	}
}